feat: invoke registered page tools - #6
Merged
Merged
Conversation
Resolves extension/src/probe.js, where this branch added invokeWebMcp and cancelWebMcp while main rewrote probeWebMcp for type-checking. Both sides are kept, with two changes the merge made worth doing: The catalog normalization is now one shared function. Both copies did the same work, and invokeWebMcp compares its normalized catalog against the one the server recorded from probeWebMcp -- had the two ever drifted apart, every invocation would have failed with stale_catalog. executeTool() is documented as unspecified. It is not in the WebMCP IDL or in webmcp-types; the upstream README still carries "TODO: Spec and describe the modelContext.getTools() and modelContext.executeTool() APIs", and webmachinelearning/webmcp#51 has been open since 2025-11-03. getTools() was specced in #223, its sibling was not. The existing feature-detect-and-report-unavailable behavior is unchanged and is what section 21 of the design spec requires; it now passes through a single narrow boundary so everything the spec does define stays type-checked. Webby's own main-world global is declared in src/globals.d.ts rather than loosened, keeping webmcp-types the only external contract asserted.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
page.callrouting pinned to an explicit browser document and catalog revisionVerification
mix compile --warnings-as-errorsmix test(70 passed)mix credo --strictnpm test --prefix extension(12 passed)MIX_ENV=prod mix assets.deploygit diff --checkBoundaries